package com.lg.system;

import java.text.SimpleDateFormat;
public class Common {
	  private static int count = 1000; 
	  private static Object sid = new Object();
	/**
	   * ��� 18 λ�ı��
	   * @return String
	   */
	  public static String getNewID(){
	    synchronized(sid){
	      if (count >= 9999)
	    	  count = 1000;
	      StringBuffer sb = new StringBuffer(20);
	      SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmss");

	      sb.append(format.format(new java.util.Date()));
	      sb.append(count++);
	      return sb.toString();
	    } 
	  }
	  
	  /**
		 * 将null转换为空白
		 *
		 */
	   public static String  nullToBlank(String str){
		   String tempStr = "";
		   if(str != null){
			   tempStr=str;
		   }
		   return tempStr;
	   }
	
}
